package sm.codec.type;

public enum NullValue {
	NumberNull("NumberNull", 1), CharacterNull("CharacterNull", 2), TimeNull(
			"TimeNull", 3), LogicalNull("LogicalNull", 4), LabelNull(
			"LabelNull", 5), RecordNull("RecordNull", 6), OffsetNull(
			"OffsetNull", 7), ArrayNull("ArrayNull", 8), StructureNull(
			"StructureNull", 9), OperatorNull("OperatorNull", 10), ExpressionNull(
			"ExpressionNull", 11), PseudoNull("PseudoNull", 12), LocalVariableNull(
			"LocalVariableNull", 13), GlobalVariableNull("GlobalVariableNull",
			14), MemberNull("MemberNull", 15);

	private String name;

	private int type;

	public String getName() {
		return name;
	}

	public int getType() {
		return type;
	}

	private NullValue(String name, int type) {
		this.name = name;
		this.type = type;
	}

	public static NullValue getNullValue(String name) {
		if (NumberNull.name.equals(name)) {
			return NumberNull;
		} else if (CharacterNull.name.equals(name)) {
			return CharacterNull;
		} else if (TimeNull.name.equals(name)) {
			return TimeNull;
		} else if (LogicalNull.name.equals(name)) {
			return LogicalNull;
		} else if (LogicalNull.name.equals(name)) {
			return LogicalNull;
		} else if (LabelNull.name.equals(name)) {
			return LabelNull;
		} else if (RecordNull.name.equals(name)) {
			return RecordNull;
		} else if (OffsetNull.name.equals(name)) {
			return OffsetNull;
		} else if (ArrayNull.name.equals(name)) {
			return ArrayNull;
		} else if (StructureNull.name.equals(name)) {
			return StructureNull;
		} else if (OperatorNull.name.equals(name)) {
			return OperatorNull;
		} else if (ExpressionNull.name.equals(name)) {
			return ExpressionNull;
		} else if (PseudoNull.name.equals(name)) {
			return PseudoNull;
		} else if (LocalVariableNull.name.equals(name)) {
			return LocalVariableNull;
		} else if (GlobalVariableNull.name.equals(name)) {
			return GlobalVariableNull;
		} else if (MemberNull.name.equals(name)) {
			return MemberNull;
		} else {
			return null;
		}
	}
}
